﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace STMS.WSTMSystem.UControls
{
    [DefaultEvent("Click")]
    public partial class UPageButton : UserControl
    {
        public UPageButton()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 按钮文本
        /// </summary>
       [Description("按钮文本")]
        public string BtnText
        {
            get { return this.lblText.Text; }
            set
            {
                this.lblText.Text = value;
                this.Invalidate();
            }
        }

        public Color FontColor
        {
            get { return this.lblText.ForeColor; }
            set
            {
                this.lblText.ForeColor = value;
                this.Invalidate();
            }
        }
        protected override void OnClick(EventArgs e)
        {
            this.FontColor = Color.FromArgb(45, 50, 116);
            base.OnClick(e);
        }

        private void lblText_Click(object sender, EventArgs e)
        {
            this.OnClick(e);
        }

       
    }
}
